3.8.29 \(\int \frac {(a+i a \tan (c+d x))^2}{\cot ^{\frac {3}{2}}(c+d x)} \, dx\) [729]

3.8.29.1 Optimal result
3.8.29.2 Mathematica [A] (verified)
3.8.29.3 Rubi [A] (verified)
3.8.29.4 Maple [B] (verified)
3.8.29.5 Fricas [B] (verification not implemented)
3.8.29.6 Sympy [F]
3.8.29.7 Maxima [B] (verification not implemented)
3.8.29.8 Giac [F]
3.8.29.9 Mupad [F(-1)]

3.8.29.1 Optimal result

Integrand size = 26, antiderivative size = 91 \[ \int \frac {(a+i a \tan (c+d x))^2}{\cot ^{\frac {3}{2}}(c+d x)} \, dx=-\frac {4 (-1)^{3/4} a^2 \text {arctanh}\left ((-1)^{3/4} \sqrt {\cot (c+d x)}\right )}{d}-\frac {2 a^2}{5 d \cot ^{\frac {5}{2}}(c+d x)}+\frac {4 i a^2}{3 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {4 a^2}{d \sqrt {\cot (c+d x)}} \]

output
-4*(-1)^(3/4)*a^2*arctanh((-1)^(3/4)*cot(d*x+c)^(1/2))/d-2/5*a^2/d/cot(d*x 
+c)^(5/2)+4/3*I*a^2/d/cot(d*x+c)^(3/2)+4*a^2/d/cot(d*x+c)^(1/2)
 
3.8.29.2 Mathematica [A] (verified)

Time = 1.77 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.84 \[ \int \frac {(a+i a \tan (c+d x))^2}{\cot ^{\frac {3}{2}}(c+d x)} \, dx=\frac {2 a^2 \left (-3+10 i \cot (c+d x)+30 \cot ^2(c+d x)+\frac {30 \sqrt [4]{-1} \arctan \left ((-1)^{3/4} \sqrt {\tan (c+d x)}\right )}{\tan ^{\frac {5}{2}}(c+d x)}\right )}{15 d \cot ^{\frac {5}{2}}(c+d x)} \]

input
Integrate[(a + I*a*Tan[c + d*x])^2/Cot[c + d*x]^(3/2),x]
 
output
(2*a^2*(-3 + (10*I)*Cot[c + d*x] + 30*Cot[c + d*x]^2 + (30*(-1)^(1/4)*ArcT 
an[(-1)^(3/4)*Sqrt[Tan[c + d*x]]])/Tan[c + d*x]^(5/2)))/(15*d*Cot[c + d*x] 
^(5/2))
 
3.8.29.3 Rubi [A] (verified)

Time = 0.62 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.03, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3042, 4156, 3042, 4025, 27, 3042, 4012, 3042, 4012, 25, 3042, 4016, 221}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(a+i a \tan (c+d x))^2}{\cot ^{\frac {3}{2}}(c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(a+i a \tan (c+d x))^2}{\cot (c+d x)^{3/2}}dx\)

\(\Big \downarrow \) 4156

\(\displaystyle \int \frac {(a \cot (c+d x)+i a)^2}{\cot ^{\frac {7}{2}}(c+d x)}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\left (-a \tan \left (c+d x+\frac {\pi }{2}\right )+i a\right )^2}{\left (-\tan \left (c+d x+\frac {\pi }{2}\right )\right )^{7/2}}dx\)

\(\Big \downarrow \) 4025

\(\displaystyle -\frac {2 a^2}{5 d \cot ^{\frac {5}{2}}(c+d x)}+\int \frac {2 \left (\cot (c+d x) a^2+i a^2\right )}{\cot ^{\frac {5}{2}}(c+d x)}dx\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {2 a^2}{5 d \cot ^{\frac {5}{2}}(c+d x)}+2 \int \frac {\cot (c+d x) a^2+i a^2}{\cot ^{\frac {5}{2}}(c+d x)}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {2 a^2}{5 d \cot ^{\frac {5}{2}}(c+d x)}+2 \int \frac {i a^2-a^2 \tan \left (c+d x+\frac {\pi }{2}\right )}{\left (-\tan \left (c+d x+\frac {\pi }{2}\right )\right )^{5/2}}dx\)

\(\Big \downarrow \) 4012

\(\displaystyle -\frac {2 a^2}{5 d \cot ^{\frac {5}{2}}(c+d x)}+2 \left (\int \frac {a^2-i a^2 \cot (c+d x)}{\cot ^{\frac {3}{2}}(c+d x)}dx+\frac {2 i a^2}{3 d \cot ^{\frac {3}{2}}(c+d x)}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {2 a^2}{5 d \cot ^{\frac {5}{2}}(c+d x)}+2 \left (\int \frac {i \tan \left (c+d x+\frac {\pi }{2}\right ) a^2+a^2}{\left (-\tan \left (c+d x+\frac {\pi }{2}\right )\right )^{3/2}}dx+\frac {2 i a^2}{3 d \cot ^{\frac {3}{2}}(c+d x)}\right )\)

\(\Big \downarrow \) 4012

\(\displaystyle -\frac {2 a^2}{5 d \cot ^{\frac {5}{2}}(c+d x)}+2 \left (\int -\frac {\cot (c+d x) a^2+i a^2}{\sqrt {\cot (c+d x)}}dx+\frac {2 i a^2}{3 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {2 a^2}{d \sqrt {\cot (c+d x)}}\right )\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {2 a^2}{5 d \cot ^{\frac {5}{2}}(c+d x)}+2 \left (-\int \frac {\cot (c+d x) a^2+i a^2}{\sqrt {\cot (c+d x)}}dx+\frac {2 i a^2}{3 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {2 a^2}{d \sqrt {\cot (c+d x)}}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {2 a^2}{5 d \cot ^{\frac {5}{2}}(c+d x)}+2 \left (-\int \frac {i a^2-a^2 \tan \left (c+d x+\frac {\pi }{2}\right )}{\sqrt {-\tan \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {2 i a^2}{3 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {2 a^2}{d \sqrt {\cot (c+d x)}}\right )\)

\(\Big \downarrow \) 4016

\(\displaystyle -\frac {2 a^2}{5 d \cot ^{\frac {5}{2}}(c+d x)}+2 \left (\frac {2 a^4 \int \frac {1}{a^2 \cot (c+d x)-i a^2}d\sqrt {\cot (c+d x)}}{d}+\frac {2 i a^2}{3 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {2 a^2}{d \sqrt {\cot (c+d x)}}\right )\)

\(\Big \downarrow \) 221

\(\displaystyle -\frac {2 a^2}{5 d \cot ^{\frac {5}{2}}(c+d x)}+2 \left (-\frac {2 (-1)^{3/4} a^2 \text {arctanh}\left ((-1)^{3/4} \sqrt {\cot (c+d x)}\right )}{d}+\frac {2 i a^2}{3 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {2 a^2}{d \sqrt {\cot (c+d x)}}\right )\)

input
Int[(a + I*a*Tan[c + d*x])^2/Cot[c + d*x]^(3/2),x]
 
output
2*((-2*(-1)^(3/4)*a^2*ArcTanh[(-1)^(3/4)*Sqrt[Cot[c + d*x]]])/d + (((2*I)/ 
3)*a^2)/(d*Cot[c + d*x]^(3/2)) + (2*a^2)/(d*Sqrt[Cot[c + d*x]])) - (2*a^2) 
/(5*d*Cot[c + d*x]^(5/2))
 

3.8.29.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4012
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
 (f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)*((a + b*Tan[e + f*x])^(m + 1)/ 
(f*(m + 1)*(a^2 + b^2))), x] + Simp[1/(a^2 + b^2)   Int[(a + b*Tan[e + f*x] 
)^(m + 1)*Simp[a*c + b*d - (b*c - a*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a 
, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && LtQ[m, -1 
]
 

rule 4016
Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(b_.)*tan[(e_.) + (f_.)*(x_ 
)]], x_Symbol] :> Simp[2*(c^2/f)   Subst[Int[1/(b*c - d*x^2), x], x, Sqrt[b 
*Tan[e + f*x]]], x] /; FreeQ[{b, c, d, e, f}, x] && EqQ[c^2 + d^2, 0]
 

rule 4025
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
 (f_.)*(x_)])^2, x_Symbol] :> Simp[(b*c - a*d)^2*((a + b*Tan[e + f*x])^(m + 
 1)/(b*f*(m + 1)*(a^2 + b^2))), x] + Simp[1/(a^2 + b^2)   Int[(a + b*Tan[e 
+ f*x])^(m + 1)*Simp[a*c^2 + 2*b*c*d - a*d^2 - (b*c^2 - 2*a*c*d - b*d^2)*Ta 
n[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] 
 && LtQ[m, -1] && NeQ[a^2 + b^2, 0]
 

rule 4156
Int[(cot[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x 
_)]^(n_.))^(p_.), x_Symbol] :> Simp[d^(n*p)   Int[(d*Cot[e + f*x])^(m - n*p 
)*(b + a*Cot[e + f*x]^n)^p, x], x] /; FreeQ[{a, b, d, e, f, m, n, p}, x] && 
  !IntegerQ[m] && IntegersQ[n, p]
 
3.8.29.4 Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 211 vs. \(2 (74 ) = 148\).

Time = 1.20 (sec) , antiderivative size = 212, normalized size of antiderivative = 2.33

method result size
derivativedivides \(-\frac {a^{2} \left (-\frac {4 i}{3 \cot \left (d x +c \right )^{\frac {3}{2}}}+\frac {2}{5 \cot \left (d x +c \right )^{\frac {5}{2}}}-\frac {4}{\sqrt {\cot \left (d x +c \right )}}-\frac {i \sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}{1+\cot \left (d x +c \right )-\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )\right )}{2}-\frac {\sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )-\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}{1+\cot \left (d x +c \right )+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )\right )}{2}\right )}{d}\) \(212\)
default \(-\frac {a^{2} \left (-\frac {4 i}{3 \cot \left (d x +c \right )^{\frac {3}{2}}}+\frac {2}{5 \cot \left (d x +c \right )^{\frac {5}{2}}}-\frac {4}{\sqrt {\cot \left (d x +c \right )}}-\frac {i \sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}{1+\cot \left (d x +c \right )-\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )\right )}{2}-\frac {\sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )-\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}{1+\cot \left (d x +c \right )+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )\right )}{2}\right )}{d}\) \(212\)

input
int((a+I*a*tan(d*x+c))^2/cot(d*x+c)^(3/2),x,method=_RETURNVERBOSE)
 
output
-1/d*a^2*(-4/3*I/cot(d*x+c)^(3/2)+2/5/cot(d*x+c)^(5/2)-4/cot(d*x+c)^(1/2)- 
1/2*I*2^(1/2)*(ln((1+cot(d*x+c)+2^(1/2)*cot(d*x+c)^(1/2))/(1+cot(d*x+c)-2^ 
(1/2)*cot(d*x+c)^(1/2)))+2*arctan(1+2^(1/2)*cot(d*x+c)^(1/2))+2*arctan(-1+ 
2^(1/2)*cot(d*x+c)^(1/2)))-1/2*2^(1/2)*(ln((1+cot(d*x+c)-2^(1/2)*cot(d*x+c 
)^(1/2))/(1+cot(d*x+c)+2^(1/2)*cot(d*x+c)^(1/2)))+2*arctan(1+2^(1/2)*cot(d 
*x+c)^(1/2))+2*arctan(-1+2^(1/2)*cot(d*x+c)^(1/2))))
 
3.8.29.5 Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 391 vs. \(2 (73) = 146\).

Time = 0.26 (sec) , antiderivative size = 391, normalized size of antiderivative = 4.30 \[ \int \frac {(a+i a \tan (c+d x))^2}{\cot ^{\frac {3}{2}}(c+d x)} \, dx=-\frac {15 \, \sqrt {-\frac {16 i \, a^{4}}{d^{2}}} {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (4 i \, a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + \sqrt {-\frac {16 i \, a^{4}}{d^{2}}} {\left (i \, d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, d\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{2 \, a^{2}}\right ) - 15 \, \sqrt {-\frac {16 i \, a^{4}}{d^{2}}} {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (4 i \, a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + \sqrt {-\frac {16 i \, a^{4}}{d^{2}}} {\left (-i \, d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, d\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{2 \, a^{2}}\right ) + 8 \, {\left (43 i \, a^{2} e^{\left (6 i \, d x + 6 i \, c\right )} + 11 i \, a^{2} e^{\left (4 i \, d x + 4 i \, c\right )} - 31 i \, a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} - 23 i \, a^{2}\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}}{60 \, {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]

input
integrate((a+I*a*tan(d*x+c))^2/cot(d*x+c)^(3/2),x, algorithm="fricas")
 
output
-1/60*(15*sqrt(-16*I*a^4/d^2)*(d*e^(6*I*d*x + 6*I*c) + 3*d*e^(4*I*d*x + 4* 
I*c) + 3*d*e^(2*I*d*x + 2*I*c) + d)*log(1/2*(4*I*a^2*e^(2*I*d*x + 2*I*c) + 
 sqrt(-16*I*a^4/d^2)*(I*d*e^(2*I*d*x + 2*I*c) - I*d)*sqrt((I*e^(2*I*d*x + 
2*I*c) + I)/(e^(2*I*d*x + 2*I*c) - 1)))*e^(-2*I*d*x - 2*I*c)/a^2) - 15*sqr 
t(-16*I*a^4/d^2)*(d*e^(6*I*d*x + 6*I*c) + 3*d*e^(4*I*d*x + 4*I*c) + 3*d*e^ 
(2*I*d*x + 2*I*c) + d)*log(1/2*(4*I*a^2*e^(2*I*d*x + 2*I*c) + sqrt(-16*I*a 
^4/d^2)*(-I*d*e^(2*I*d*x + 2*I*c) + I*d)*sqrt((I*e^(2*I*d*x + 2*I*c) + I)/ 
(e^(2*I*d*x + 2*I*c) - 1)))*e^(-2*I*d*x - 2*I*c)/a^2) + 8*(43*I*a^2*e^(6*I 
*d*x + 6*I*c) + 11*I*a^2*e^(4*I*d*x + 4*I*c) - 31*I*a^2*e^(2*I*d*x + 2*I*c 
) - 23*I*a^2)*sqrt((I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) - 1))) 
/(d*e^(6*I*d*x + 6*I*c) + 3*d*e^(4*I*d*x + 4*I*c) + 3*d*e^(2*I*d*x + 2*I*c 
) + d)
 
3.8.29.6 Sympy [F]

\[ \int \frac {(a+i a \tan (c+d x))^2}{\cot ^{\frac {3}{2}}(c+d x)} \, dx=- a^{2} \left (\int \frac {\tan ^{2}{\left (c + d x \right )}}{\cot ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx + \int \left (- \frac {2 i \tan {\left (c + d x \right )}}{\cot ^{\frac {3}{2}}{\left (c + d x \right )}}\right )\, dx + \int \left (- \frac {1}{\cot ^{\frac {3}{2}}{\left (c + d x \right )}}\right )\, dx\right ) \]

input
integrate((a+I*a*tan(d*x+c))**2/cot(d*x+c)**(3/2),x)
 
output
-a**2*(Integral(tan(c + d*x)**2/cot(c + d*x)**(3/2), x) + Integral(-2*I*ta 
n(c + d*x)/cot(c + d*x)**(3/2), x) + Integral(-1/cot(c + d*x)**(3/2), x))
 
3.8.29.7 Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 161 vs. \(2 (73) = 146\).

Time = 0.31 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.77 \[ \int \frac {(a+i a \tan (c+d x))^2}{\cot ^{\frac {3}{2}}(c+d x)} \, dx=-\frac {4 \, {\left (3 \, a^{2} - \frac {10 i \, a^{2}}{\tan \left (d x + c\right )} - \frac {30 \, a^{2}}{\tan \left (d x + c\right )^{2}}\right )} \tan \left (d x + c\right )^{\frac {5}{2}} - 15 \, {\left (\left (2 i + 2\right ) \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) + \left (2 i + 2\right ) \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) + \left (i - 1\right ) \, \sqrt {2} \log \left (\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right ) - \left (i - 1\right ) \, \sqrt {2} \log \left (-\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right )\right )} a^{2}}{30 \, d} \]

input
integrate((a+I*a*tan(d*x+c))^2/cot(d*x+c)^(3/2),x, algorithm="maxima")
 
output
-1/30*(4*(3*a^2 - 10*I*a^2/tan(d*x + c) - 30*a^2/tan(d*x + c)^2)*tan(d*x + 
 c)^(5/2) - 15*((2*I + 2)*sqrt(2)*arctan(1/2*sqrt(2)*(sqrt(2) + 2/sqrt(tan 
(d*x + c)))) + (2*I + 2)*sqrt(2)*arctan(-1/2*sqrt(2)*(sqrt(2) - 2/sqrt(tan 
(d*x + c)))) + (I - 1)*sqrt(2)*log(sqrt(2)/sqrt(tan(d*x + c)) + 1/tan(d*x 
+ c) + 1) - (I - 1)*sqrt(2)*log(-sqrt(2)/sqrt(tan(d*x + c)) + 1/tan(d*x + 
c) + 1))*a^2)/d
 
3.8.29.8 Giac [F]

\[ \int \frac {(a+i a \tan (c+d x))^2}{\cot ^{\frac {3}{2}}(c+d x)} \, dx=\int { \frac {{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{2}}{\cot \left (d x + c\right )^{\frac {3}{2}}} \,d x } \]

input
integrate((a+I*a*tan(d*x+c))^2/cot(d*x+c)^(3/2),x, algorithm="giac")
 
output
integrate((I*a*tan(d*x + c) + a)^2/cot(d*x + c)^(3/2), x)
 
3.8.29.9 Mupad [F(-1)]

Timed out. \[ \int \frac {(a+i a \tan (c+d x))^2}{\cot ^{\frac {3}{2}}(c+d x)} \, dx=\int \frac {{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^2}{{\mathrm {cot}\left (c+d\,x\right )}^{3/2}} \,d x \]

input
int((a + a*tan(c + d*x)*1i)^2/cot(c + d*x)^(3/2),x)
 
output
int((a + a*tan(c + d*x)*1i)^2/cot(c + d*x)^(3/2), x)